package com.rong.creatmodel.prototype.shallow;

public class AwareTest {
    public static void main(String[] args) throws  Exception {

        Aware aware = new Aware();
        Student student = new Student();
        student.setName("李四");
        aware.setStu(student);

        // 克隆对象
        Aware clone = aware.clone();
        clone.getStu().setName("张三");

        aware.show(); // 张三
        clone.show(); //张三
    }
}
